import csv
# 读取csv文件
with open('202231109院士统计表.csv', 'r',encoding='utf-8') as file:
    reader = csv.reader(file)
    data = list(reader)
# 去除空行
cleaned_data = [row for row in data if any(field.strip() for field in row)]
# 保存处理后的csv文件
with open('202231109院士统计表(Finally).csv', 'w', newline='',encoding='utf-8-sig')as file:
    writer = csv.writer(file)
    writer.writerows(cleaned_data)
